Random Spinner

Type in any number of and any size of proportional sectors of the full circle

Sector Proportions

Spin

Reset

r = 5 (slider from 0 to 10, step 0.1)
O = Intersect(xAxis, yAxis)
c = Circle(O, r)
B, P = Intersect(c, xAxis)
AngleProportions: {1, 2, 1}
AAngles = Sequence(Element[AngleProportions, k] * 360 * ° / Sum[AngleProportions], k, 1, Length[AngleProportions])
cAAngles = Sequence(Sum[AAngles, i], i, 0, Length[AAngles])
SecPoints = Sequence((r * cos(Element[cAAngles, k]), r * sin(Element[cAAngles, k])), k, 1, Length[AAngles])
ModSecPoints = Join({SecPoints, {Element[SecPoints, 1]}})
MySectors = Sequence(CircleSector[O, Element[ModSecPoints, k], Element[ModSecPoints, k + 1]], k, 1, Length[AAngles])
inputBox1 = Textfield(AngleProportions)
RandomAngle = RandomUniform(0, 360)
RandomSpinner: (r * cos(RandomAngle°), r * sin(RandomAngle°))
u = Vector(O, RandomSpinner)